package com.yuw.oophomework6;

public abstract class Student {
    // 属性
    private String stuNum;
    private String stuName;
    private String stuSex;
    private int stuAge; // 默认0
    private Double middleScore;
    private Double lastScore;
    // 行为

    /**
     * 计算综合成绩
     *
     * @return 综合成绩
     */
    public abstract Double calculateCourseScore();

    /**
     * 打印学生信息
     */
    public void printStuScore() {
        System.out.println("学号:" + this.getStuNum() + " 姓名:" + this.getStuName() + " 性别:" + this.getStuSex()
                + " 年龄:" + this.getStuAge() + " 综合成绩:" + this.calculateCourseScore());
    }


    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getStuSex() {
        return stuSex;
    }

    public void setStuSex(String stuSex) {
        this.stuSex = stuSex;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public Double getMiddleScore() {
        return middleScore;
    }

    public void setMiddleScore(Double middleScore) {
        this.middleScore = middleScore;
    }

    public Double getLastScore() {
        return lastScore;
    }

    public void setLastScore(Double lastScore) {
        this.lastScore = lastScore;
    }
}
